﻿using Framework.Core.Helper;
using Framework.SqlSugarCore.Abstractions;
using my.abp.Domain.Shared.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace my.abp.Domain.SeedData
{
	public class SysUserSeedData : ISqlSugarEntitySeedData<SysUser>
	{
		/// <summary>
		/// 种子数据
		/// </summary>
		/// <returns></returns>
		public IEnumerable<SysUser> HasData()
		{
			var encryptPasswod = MD5Encryption.Encrypt("111111", true, false);

			return new[]
			{
				new SysUser{ Id=1300000000101, Account="superadmin", Password=encryptPasswod, Name="超级管理员", Remark="超级管理员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000101 },
				new SysUser{ Id=1300000000111, Account="admin", Password=encryptPasswod, Name="系统管理员", Remark="系统管理员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000101},
				new SysUser{ Id=1300000000112, Account="user1", Password=encryptPasswod, Name="部门主管",  Remark="部门主管", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000101},
				new SysUser{ Id=1300000000113, Account="user2", Password=encryptPasswod, Name="部门职员", Remark="部门职员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000101},
				new SysUser{ Id=1300000000114, Account="user3", Password=encryptPasswod, Name="普通用户", Remark="普通用户", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000101},
				new SysUser{ Id=1300000000115, Account="user4", Password=encryptPasswod, Name="其他", Remark="会员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000101},
				 new SysUser{ Id=1300000000116, Account="user5", Password=encryptPasswod, Name="其他", Remark="会员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000101},
			};
		}
	}
}
